home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / scheme / pcscheme / geneva / pcscheme.exe / SCHEME.INI
Encoding:
Text File  |  1994-01-06  |  5.3 KB  |  117 lines

  1. ;* SCHEME.INI
  2. ;************************************************************************
  3. ;*                                                                      *
  4. ;*              PC Scheme/Geneva 4.00 Scheme Startup code               *
  5. ;*                                                                      *
  6. ;* (c) 1985-1988 by Texas Instruments, Inc. See COPYRIGHT.TXT           *
  7. ;* (c) 1992 by L. Bartholdi & M. Vuilleumier, University of Geneva      *
  8. ;*                                                                      *
  9. ;*----------------------------------------------------------------------*
  10. ;*                                                                      *
  11. ;*              Starts up a cozy environment for the user               *
  12. ;*                                                                      *
  13. ;*----------------------------------------------------------------------*
  14. ;*                                                                      *
  15. ;* Created by: L. Bartholdi             Date: 1992                      *
  16. ;* Revision history:                                                    *
  17. ;* - 18 Jun 92: Renaissance (Borland Compilers, ...)                    *
  18. ;* -  1 Sep 92: Added history auto-restore support (lb)                 *
  19. ;* - 25 Oct 92: Added extended pcs-machine-type and gimso (lb)          *
  20. ;* -  1 Dec 92: Moved history to default dir, check if exists (mv)      *
  21. ;* -  9 Jan 93: Added IO error handler, macro keys, tab completion (mv) *
  22. ;*                                                                      *
  23. ;*                                      ``In nomine omnipotentii dei''  *
  24. ;************************************************************************
  25.  
  26.         ; these are here just for portabability purposes.
  27. ; (define t #T)
  28. ; (define nil #F)
  29.  
  30.         ; history.ini is a computer-generated file updated
  31.         ; at each (exit) call with errorlevel 0.
  32.         ; it is supposed to look like:
  33.         ; (%push-history (quote ("(exit)" "..." "...")))
  34. (if (file-exists? "HISTORY.INI")
  35.     (load "HISTORY.INI"))
  36.  
  37.         ; an sample io error handler, more friendly than INSPECT
  38. (load (%system-file-name "errhand.fsl"))
  39.  
  40.         ; this installs a support for the Brief(TM) editor.
  41.         ; it declares a routine, (b), that spawns the editor.
  42.         ; uncomment it if you have Brief installed
  43. ;(load (%system-file-name "b.fsl"))
  44.  
  45.                 ; this installs a support for EdLISP, a cute tiny editor
  46.                 ; by a French team.
  47.                 ; it declares a routine, (edlisp), that spawns the editor.
  48.         ; uncomment it if you want to use edlisp
  49.         ; Don't forget to add \...\scheme\edlisp in your path !
  50. ;(load (%system-file-name "edlisp.fsl"))
  51.  
  52.         ; this is how to create a scheme editor running under PCS/Gva
  53.         ; uncomment this line if you want to use it
  54. ;(define ed (make-scheme-editor))
  55.  
  56.         ; this is a personal configuration, so I know all's OK.
  57. ;(when (eq? (dos-get-env "USER") "LBARTHO")
  58. ;  (set! pcs-gc-reset "PCS [Free: scheme=%lu, kernel=%lu]")
  59. ;  (window-set-attribute! 'console 'text-attributes #h4e))
  60.  
  61.         ; this installs a few things on my HP95lx.
  62.         ; it's a PC-compatible but has a smaller screen (40x16)
  63.         ; and non-standard graphics.
  64. (when (equal? (caddr pcs-machine-type) -29633)
  65.   (set! pcs-gc-reset "PC Scheme/Geneva 4.02")
  66.   (window-set-size! 'console 15 80)
  67.   (window-set-size! pcs-status-window 1 80)
  68.   (window-set-position! pcs-status-window 15 0)
  69.   (set-car! max-console 16)
  70.   (install-user-driver "HP95"))         ; BGI graphics
  71.  
  72.         ; Now define macro keys
  73.         ; 59 -> 68 are function keys F1 -> F10
  74. (define pcs-macro-keys '(
  75.     (59 "(b)")                ; F1: my dos editor
  76.     (60 "(ed)")                ; F2: my scheme editor
  77.     (61 "(set! pcs-debug-mode #T)")        ; F3: include debug info
  78.     (62 "(set! pcs-debug-mode '())")    ; F4: exclude debug info
  79.     (63 . "(fast-load (%system-file-name \""); F5: load a package
  80.     (64 . "(load \"")            ; F6: load a file
  81.     (65 . "(fast-save-file \"")        ; F7: precompile a file
  82.     (68 "(exit)")))                ; F10: exit
  83.  
  84.         ; This is how to teach PCS/GE
  85.         ; to complete with TAB symbols neither
  86.         ; bounds in global environment, nor
  87.         ; autoloadable, nor having properties
  88. (pcs-learn-symbols '(CONSOLE TEXT-ATTRIBUTES BORDER-ATTRIBUTES))
  89.  
  90.         ; in case you're interested in LISP's (LOOP) macro ...
  91.         ; uncomment the following lines
  92.         ; see also Common Lisp Compatibility Package (CLCP.FSL)
  93. ;(macro loop
  94. ;  (lambda (form)
  95. ;    (let* ((me (gensym))
  96. ;          (explode (named-lambda (explode pairs)
  97. ;                     (cond ((null? pairs) `((,me)))
  98. ;                           ((eq? (caar pairs) 'COND)
  99. ;                            (let ((test (cadar pairs))
  100. ;                                  (if-true (cddar pairs))
  101. ;                                  (if-false `(BEGIN ,@(explode (cdr pairs)))))
  102. ;                              (if (null? if-true)
  103. ;                                  (let ((temp (gensym)))
  104. ;                                    `((LET ((,temp ,test))
  105. ;                                        (IF ,test ,test ,if-false))))
  106. ;                                  `((IF ,test (BEGIN ,@if-true) ,if-false)))))
  107. ;                           (else (cons (car pairs) (explode (cdr pairs)))))))
  108. ;        )
  109. ;      `(LETREC ((,me (lambda () ,@(explode (cdr form)))))
  110. ;        (,me)))))
  111.  
  112.         ; Finally, the start-up !
  113.  
  114. (newline)
  115. (writeln "SCHEME.INI loaded. Good luck.")
  116. (set! pcs-debug-mode #T)
  117.